<%@ taglib tagdir="/WEB-INF/tags" prefix="jct" %>
<%@ taglib uri="http://displaytag.sf.net/el" prefix="display" %>
<%@ taglib uri="http://www.javacenter.com.br/tags" prefix="jc" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>


<jc:form nome="frmPrincipal" controller="generic"  forwardParameters="true">
	<jc:painel>
		<li><a href="#">${legenda}</a></li>
		<jct:fields detalhe="false" entity="${entidade}"/>
	</jc:painel>
	<jc:painel>
		<c:forEach var="item" items="${entidade.detalhes}">
			<a href="#">${item.name}</a>
			<div>
				<c:forEach var="item2" items="${item.list}">		
					<jct:fields detalhe="true" entity="${item2}"/>
				</c:forEach>
			</div>	
		</c:forEach>
	</jc:painel> 
</jc:form>
 
 
<!-- This JavaScript snippet activates those tabs --> 
<script> 
 
// perform JavaScript after the document is scriptable.
$(function() {
	// setup ul.tabs to work as tabs for each div directly under div.panes
	$("ul.tabs").tabs("div.panes > div");
});
</script> 
<div align="center" style="margin-top: 50px">
	<span class="alone" id="gravar" onclick="confirmarEntidadeGenerica('${param['operacao']}')">Gravar</span>
	<span class="alone" onclick="listaEntidadeGenerica()">Lista</span>
</div>
<script>
	$('input').keypress(function(e) {
		if(e.keyCode == 13) {
			return false	
		}
	});
	$('input').keyup(function(e) {
		if(e.keyCode == 13) {
			$("#gravar").click()	
		}
	});
</script>

